#ifndef __TTY_RW__ 
#define __TTY_RW__ 

class CTtyRw
{
public:
	static CTtyRw* getInstance();
	virtual ~CTtyRw();

private:
	CTtyRw();


public:
    int openTty( char *strTtyName);
    int readDataTty( char *rcv_buf, int TimeOut, int Len);
    int sendDataTty( char *send_buf, int Len);    

private:
    int openPort(int *fd, char *strTtyName);
    int setOpt(int fd, int nSpeed, int nBits, char nEvent, int nStop);
    


private:

    int m_fdSerial;

    static CTtyRw* m_pInstance;

};

#endif

